package day1015;
//Object类：所有类的父类
public class Test3{
    public static void main(String[] args) {
        Object[] f=new Object[1];
        f[0]=new Male();

        if(f[0] instanceof Male){
            Male m=(Male)f[0];
        }else{
            FeMale m=(FeMale)f[0];
        }


    }
}


class FeMale{}
class Male{}




/*
//Object类：所有类的父类
public class Test3{
    public static void main(String[] args) {
        Object f=new FeMale();
        if(f instanceof Male){
            Male m=(Male)f;
        }else{
            FeMale m=(FeMale)f;
        }
    }
}


class FeMale{}
class Male{}*/
